<%#=session[:user]%>

<div class="form">
  <% form_tag url_for(:controller => "queries",  :action => "create" , :advertisment_id => @advertisment), :multipart => true do  %>
  <div class="message">Contact this business with your requirements and queries.</div>
  <div class="form-inputs">
    <%=text_field :user, :full_name ,:size => 28,:class=>"your-name",:value=> (session[:user].nil? ? "Your name*"  : session[:user].full_name) , :maxlength=>"40" -%>
    <%=text_field :user, :email     ,:size => 28,:class=>"e-mail-id",:value=> (session[:user].nil? ? "E-mail ID*"  : session[:user].email)     , :maxlength=>"40" -%>
    <%=text_field :user, :mobile_no ,:size => 20,:class=>"mobile-no",:value=> (session[:user].nil? ? "Mobile No.*" : session[:user].mobile_no) , :maxlength=>"10" -%>
    <div class="query">
      <%=text_area :query, :content , :size => "55x3"  ,:wrap=> "virtual",:value=>"Message*\n\Please provide a detailed response to get a better reply"%>
    </div>
   <div class="attach"><%=link_to image_tag("Attach.jpg", :border=>"0px") + "Attach a file", "javascript:void(0);",:onclick=>"Element.show('attach-field');"-%></div>
   <div class="attach-field" style="display:none;" id="attach-field">
    <%=file_field(:attachment,:file,:class=>"e-mail-id") -%>
   </div>
  </div>
 
  
  <div class="send-message"><%= image_submit_tag("send-message.jpg") -%></div>
  <%end -%>
</div>